
import java.util.Scanner;

       public class GCD {
            public static int gcd(int m, int n) {
                if (m % n == 0) {
                    return n;
                } else {
                    return gcd(n, m % n);
                }
            }

            public static void main(String[] args) {
                Scanner scanner = new Scanner(System.in);
                System.out.print("请输入第一个整数：");
                int m = scanner.nextInt();
                System.out.print("请输入第二个整数：");
                int n = scanner.nextInt();
                System.out.println("最大公约数为：" + gcd(m, n));
            }
       }

